﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SimpleGUI.DetectionMethods
{
	/// <summary>
	///	Delegate to notify the detection of a new dart.
	///	
	/// TODO:
	///		Give the Score parameter its own struct
	/// </summary>
	/// <param name="sender"></param>
	/// <param name="score"></param>
	public delegate void DartDetectionEventHandler(object sender, int score);

	/// <summary>
	/// Interface for the DartDetector classes
	/// </summary>
	interface IDartDetector
	{
		/// <summary>
		/// Is the detection method running?
		/// </summary>
		bool running{ get; }
		
		/// <summary>
		/// Has this detection method a interface screen (setup or debug screen)?
		/// </summary>
		bool hasInterface { get; }
		
		/// <summary>
		/// Is the interface visible?
		/// </summary>
		bool visible { get; }
		
		/// <summary>
		/// The event that notifies when there is a new dart detected in the board
		/// </summary>
		event DartDetectionEventHandler DartDetected;
		
		/// <summary>
		/// Start the detection of darts!
		/// </summary>
		void Start();

		/// <summary>
		/// Stop the detection of darts!
		/// </summary>
		void Stop();
		
		/// <summary>
		/// Show interface (if it has one)
		/// </summary>
		void ShowInterface();
		
		/// <summary>
		/// Hide interface (if it has one)
		/// </summary>
		void HideInterface();
	}
}
